
// @ts-ignore
import {Button, Col, Form, Input, Row, Space, theme} from "antd";
import React from "react";
import FormItem from "antd/es/form/FormItem";

// @ts-ignore
export default function SearchForm({onSearchFinish}){
	const { token } = theme.useToken();
	const [form] = Form.useForm();
	const formStyle: React.CSSProperties = {
		maxWidth: 'none',
		background: token.colorFillAlter,
		borderRadius: token.borderRadiusLG,
		padding: 24,
	};
	return (
		<Form form={form} name="advanced_search" style={formStyle} onFinish={onSearchFinish} size={"small"}>
			<Row gutter={24}>
				<Col span={6} key={'col1'}>
					<FormItem name={'userKeyword'} label={'昵称'} rules={[{required: false}]} >
						<Input />
					</FormItem>
				</Col>
			</Row>
			<div style={{textAlign: 'right'}}>
				<Space size={"small"}>
					<Button type="primary" htmlType="submit">
						查询
					</Button>
					<Button
						onClick={() => {
							form.resetFields();
						}}
					>
						重置
					</Button>
				</Space>
			</div>
		</Form>);
}